import { Cards, Steps } from 'nextra/components'
import { Callout } from '@/components'

# Migrating to Suspensive v2

Suspensive v2, **we focused on increasing compatibility and improving DX**.
To accomplish this, we had to introduce some dramatic changes. As a result, we removed some previously deprecated features and added some new interfaces.

### The minimum required React version is now 18.0

**Suspensive v2 requires React 18.0 or later.** This is because we are using the new useSyncExternalStore hook, which is only available in React 18.0 and later. Previously, we have been using the shim provided by React(use-sync-external-store).
In addition, in React 18, [Suspense-related features were added](https://legacy.reactjs.org/blog/2022/03/29/react-v18.html), We decided that the direction of the Suspensive libraries needed to focus on React 18 or higher in the future rather than responding to Legacy React.

### Key Features

- **React 18+ support**: [#629](https://github.com/toss/suspensive/pull/629) - Updated to use React 18 native APIs
- **New queryOptions**: [#828](https://github.com/toss/suspensive/pull/828) - Added queryOptions for better type safety and query management
- **Suspense clientOnly prop**: [#521](https://github.com/toss/suspensive/pull/521) - Added clientOnly prop to replace Suspense.CSROnly
- **DevMode for development**: [#470](https://github.com/toss/suspensive/pull/470) - Added DevMode for better debugging experience
- **Improved browser support**: [#455](https://github.com/toss/suspensive/pull/455) - Added support for wider range of browsers
- **Naming convention updates**: [#401](https://github.com/toss/suspensive/pull/401) - Aligned naming with TanStack Query v5 conventions
- **AsyncBoundary deprecation**: [#345](https://github.com/toss/suspensive/pull/345) - Deprecated AsyncBoundary for cleaner API design

### Migration guide

<Cards num={2}>
  <Cards.Card
    title="See @suspensive/react v2"
    href="/docs/react/migration/migrate-to-v2"
  />
  <Cards.Card
    title="See @suspensive/react-query v2"
    href="/docs/react-query/migration/migrate-to-v2"
  />
</Cards>

## Thanks to all Suspensive contributors

We were able to release v2 because of Suspensive's contributors. Thank you to everyone who worked together to make it a better library, and we look forward to your continued support.

[![contributors](https://contrib.rocks/image?repo=toss/suspensive)](https://github.com/toss/suspensive/graphs/contributors)
